<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <base href="{$Think.const.BASE_PATH}">
    <title>{$film['name']}-{$film.subClassName}-{$film.typeName}-{$Think.config.siteName}</title>
    <!--引入头部meta文件 -->
    {include file="index/head_meta" /}
    <!--引入头部link(css)文件 -->
    {include file="index/head_link" /}
    <!--引入头部script文件 -->
    {include file="index/head_script" /}


    <!--=====================JS_Link===========================-->
    <script src="public/static/js/download/base64.js"></script>
    <script>var sitePath = ''</script>

    <!--评分插件-->
    <script src="public/static/js/detail/jquery.raty.min.js" type="text/javascript"></script>

    <!--css文件-->
    <link href="public/static/css/index/xl/detail.css?v={$Think.const.NOW_TIME}" type="text/css" rel="stylesheet" />

    <script type="text/javascript">
        window.prourl = "{$Think.const.BASE_PATH}";
        window.filmId = "{$film.id}";
        window.filmSrc = Base64.decode("{$src}");
    </script>
    <script type="text/javascript">

        /**窗口变化重新计算大小*/
        function updateFilmSize() {
            var w = $(".player").width();
            var h = (w * 3) / 4;
            $(".player").css("height", h + "px");
        }

        $(document).ready(function(){
            updateFilmSize();
            $(window).resize(function(){
                updateFilmSize();
            });
        });
    </script>
</head>
<body>
    <!--引入头部html文件 -->
    {include file="index/head"/}
    <div class="container" style="margin-top:50px; ">
        {if condition="$Think.session.uid.userName=='' or $Think.session.uid.userName==null"}
        <div class="row">
            <marquee onmouseover=this.stop() onmouseout=this.start() style="width: 100%;">{$Think.config.advertisement}</marquee>
        </div>
        {/if}
        <div class="row" style="background: #dcdfe2;">
            <div class="col">
                <div class="wz">
                    当前位置: <a href="/">首页</a>
                    &nbsp;&nbsp;»&nbsp;&nbsp;<a href="{:url('xl/index','cataLog_id='.$film.cataLog_id)}">{$film.cataLogName}</a>
                    &nbsp;&nbsp;»&nbsp;&nbsp;<a href="{:url('xl/index','subClass_id='.$film.subClass_id)}">{$film.subClassName}</a>
                    &nbsp;&nbsp;»&nbsp;&nbsp;<a
                        href="{:url('xl/index','type_id='.$film.type_id)}">{$film.typeName}</a>
                    &nbsp;&nbsp;»&nbsp;&nbsp;{$film.name}
                </div>
            </div>
        </div>

        <div class="row">
            <div class="col-sm-8">
                <div class="row">
                    <div class="col-sm-4" style="margin-top: 10px;margin-bottom: 10px;">
                        <div class="pic">
                            <img class="lazy" data-original="{$film.image}" alt="{$film.name}">
                             <a href="{:url('xl/detail','film_id='.$film.id)}#kan">立即播放</a>
                        </div>
                    </div>
                    <div class="col-sm-8" style="margin-top: 10px;margin-bottom: 10px;">
                        <div class="info" style="background: #fff;padding: 10px;">
                            <h1>{$film.name}</h1>
                            <ul>
                                <li>
                                    <span>上映年代：</span>{$film.onDecade}&nbsp;&nbsp;
                                    <span>状态：</span>{$film.status}
                                </li>
                                <li>
                                    <span>类型：</span>
                                    <a href="{:url('xl/index','type='.$film.type_id)}" target="_blank">{$film.typeName}</a>
                                </li>
                                <li>
                                    <span>主演：</span>
                                    <a href="javascript:;">{$film.actor}</a>
                                </li>
                                <li>
                                    <span>地区：</span>{$film.locName}
                                </li>
                                <li>
                                    <span>更新日期：</span>{$film.updateTime}&nbsp;&nbsp;
                                </li>
                                <li>
                                    <span>剧情：</span>{$film.plot|substr=0, 200}[<a href="{:url('xl/detail','film_id='.$film.id)}#desc"><span>详细</span></a>]
                                </li>
                            </ul>
                        </div>
                    </div>
                </div>
                <div class="row">
                    <div class="col">
                        {volist name="$resListDupan" id="reslist" key="i"}
                            {if condition="$i.index == 0"}
                            <div class="updatetps clearfix">更新小提示：度盘：{$reslist.link} 密码：{$reslist.name}</div>
                            {/if}
                        {/volist}
                    </div>
                </div>
            </div>
            <div class="col-sm-4" style="margin-top: 10px;margin-bottom: 10px;">
                <div class="infoad" >
                    <div class="skydrive">
                        <p><span>友情提示：</span>欢迎大家使用网盘连接下载！</p>
                        <ul>
                            {volist name="$resListDupan" id="relist"}
                            <li class="wbaidu"><a href="{$relist.link}" target="_blank">密码：{$relist.name}</a></li>
                            {/volist}
                        </ul>
                    </div>
                </div>
            </div>
        </div>

        <!--间隔-->
        <div class="row" style="background: #dcdfe2;height: 10px;"></div>

        <div class="row">
            <div class="col">
                <div class="endpage clearfix">
                    <!--======================猜你喜欢 START=============================== -->
                    <div class="ulike">
                        <div class="title"><span>猜你喜欢</span></div>
                        <ul class="img-list imglist clearfix">
                            {volist name="$films" id="list"}
                                <li>
                                    <a class="play-img" href="{:url('xl/detail','film_id='.$list.id)}" title="{$list.name}">
                                        <img class="lazy" data-original="{$list.image}" alt="{$list.name}"/>
                                        <i></i>
                                        <em>
                                            {if condition="$list.resolution eq '1080'"}1280高清{/if}
                                            {if condition="$list.resolution neq '1080'"}{$list.resolution}P{/if}
                                        </em>
                                    </a>
                                    <h5>
                                        <a href="{:url('xl/detail','film_id='.$list.id)}" title="{$list.name}">{$list.name}</a>
                                    </h5>
                                </li>
                            {/volist}
                        </ul>
                    </div>
                    <!--======================猜你喜欢 END=============================== -->
                </div>
            </div>
        </div>

        <!--间隔-->
        <div class="row" style="background: #dcdfe2;height: 10px;"></div>

        <div class="row">
            <div class="col">
                <a id="kan"></a>
                <!--在线播放 START-->
                {if condition="count($resListFlh)!=0"}
                <div style="background: white;width: 100%;height: auto;margin-top:10px;">
                    <div class="row">
                        <div class="col-sm-6">
                            <p><span class="title-icon">在线播放</span></p>
                        </div>
                        <div class="col-sm-6">
                            <p>
                        <span  class="title-con">
                            此处支持在线播放，若不能播放请下载后观看或者点击
                            <a href="javascript:;" onclick="fk('y1')" style="color:red;">失效一键反馈</a>
                        </span>
                            </p>
                        </div>
                    </div>
                </div>
                <div class="row">
                    <div class="col">
                        <div class="ndownlist">
                            <ul>
                                {if condition="$src!=null"}
                                <div class="player">
                                    <iframe src="{:url('xl/pc')}" height="100%" width="100%" frameborder="0" scrolling="no"></iframe>
                                </div>
                                {/if}
                                <div class="mad-box-form">
                                    {volist name="resListFlh" id="li"}
                                    <a class="mad-a" href="javascript:;" data="{$li.link}" id="mad{$li.episodes}" j="{$li.episodes}" onclick="Flh(this)">{$li.episodes}集</a>
                                    {/volist}
                                </div>
                            </ul>
                        </div>
                    </div>
                </div>
                {/if}
                <!--在线播放 END-->
            </div>
        </div>

        <div class="row">
            <div class="col">
                <!--下载地址-->
                {if condition="count($resListHttp)!=0 ||count($resListOther)!=0 ||count($resListThunder)!=0 || count($resListEd2k)!=0"}
                    <a id="down"></a>
                    <!--下载地址1-->
                    {if condition="count($resListEd2k)!=0"}
                    <div style="background: white;width: 100%;height: auto;margin-top:10px;padding: 5px;">
                        <div class="row">
                            <div class="col-sm-6">
                                <p><span class="title-icon">下载地址1</span></p>
                            </div>
                            <div class="col-sm-6">
                                <p>
                                    <span class="title-con">
                                        此处支持迅雷、QQ旋风、小米路由下载，同时支持迅雷影音播放，若不能下载请点击
                                        <a href="javascript:;" onclick="fk('x1')" style="color:red;">失效一键反馈</a>
                                    </span>
                                </p>
                            </div>
                        </div>
                    </div>
                    <div class="row">
                        <div class="col">
                            <div class="ndownlist">
                                <script>
                                    var GvodUrls = "{$resListEd2k[0]->link}";
                                </script>
                                {if condition="count($resListEd2k)!=0"}
                                    <script src="public/static/js/download/xunlei.js"></script>
                                    <script src="public/static/js/download/check.js"></script>
                                    <script src="public/static/js/download/function1.js"></script>
                                    <script src="public/static/js/download/function2.js"></script>
                                    <ul>
                                        <script>
                                            var mvName = "";
                                            var j = 0;
                                            var xmhref;
                                            for (var i = 0; i < GvodUrlLen; i++) {
                                                mvName = get_movie_name(GvodUrlArray[i], '/');
                                                j++;
                                                if (j == 1) {
                                                    uclass = "class=post2";
                                                    j = -1;
                                                } else {
                                                    uclass = "";
                                                }
                                                xmhref = "https://d.miwifi.com/d2r/?url=" + Base64.encodeURI(ThunderEncode(GvodUrlArray[i])) + "&src=xunbo";
                                                document.writeln('<li><div class="row" style="padding: 12px 0px;"><div class="col-sm-6"><p><i><input type="checkbox" value="\' + GvodUrlArray[i] + \'" name="CopyAddr1" /></i><a oncontextmenu=ThunderNetwork_SetHref_b(this) onclick="return xunbotask(this)" href="javascript:void(0)" thunderResTitle="" thunderType="" thunderPid="20369" thunderHref="' + ThunderEncode(GvodUrlArray[i]) + '" >' + getSubstr(GvodUrlArray[i]) + '</a></p></div><div class="col-sm-6"><span><a class=d5 href="' + ThunderEncode(GvodUrlArray[i]) + '" target=_blank title="迅雷高速下载">迅雷</a><a class=d1 href="javascript:video(0);" onclick="start(\'' + GvodUrlArray[i] + '\')" title="迅雷影音播放">看看</a><a class=d2 href="http://lixian.vip.xunlei.com/lixian_login.html?referfrom=union&ucid=20369&furl=' + encodeURIComponent(ThunderEncode(GvodUrlArray[i])) + '" target=_blank title="迅雷离线下载">离线</a><a href="###" qhref="' + GvodUrlArray[i] + '" onclick="XFLIB.startDownload(this,event,21590)" oncontextmenu = "OnContextClick(this, event)" class=d3 title="QQ旋风下载">旋风</a><a href="' + xmhref + '" target=_blank class=d4 title="小米路由下载">小米</a></span></div></div></li>');
                                            }
                                        </script>
                                    </ul>
                                {/if}
                            </div>
                        </div>
                    </div>
                    {/if}
                    <!--下载地址1-->

                    <!--下载地址2-->
                    {if condition = "count($resListHttp)!=0||count($resListOther)!=0||count($resListThunder)!=0"}
                    <div style="background: white;width: 100%;height: auto;margin-top:10px;padding: 5px;">
                        <div class="row">
                            <div class="col-sm-6">
                                <p>
                                    <span class="title-icon">下载地址2</span>
                                </p>
                            </div>
                            <div class="col-sm-6">
                                <p>
                                    <span class="title-con">
                                        此处支持本地下载、迅雷下载，若不能下载请点击
                                        <a href="javascript:;" onclick="fk('x2')" style="color:red;">失效一键反馈</a>
                                    </span>
                                </p>
                            </div>
                        </div>
                    </div>

                    <div class="row">
                        <div class="col">
                            <div class="ndownlist">
                                <ul class="thunder">
                                    {volist name="resListHttp" id="relist"}
                                    <li>
                                        <div class="row">
                                            <div class="col-sm-6">
                                                <i><input type="checkbox" value="{$relist.id}" name="CopyAddr1"/></i>
                                                <p style="width:300px;height: auto;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;">{$relist.name}</p>
                                            </div>

                                            <div class="col-sm-6">
                                                 <a href="{$relist.link}" style="float: right" class="btn">下载</a>
                                            </div>
                                        </div>
                                    </li>
                                    {/volist}

                                    {volist name="resListThunder" id="relist"}
                                    <li>
                                        <div class="row">
                                            <div class="col-sm-6">
                                                <i><input type="checkbox" value="{$relist.id}" name="CopyAddr1"/></i>
                                                <p style="width:300px;height: auto;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;">{$relist.name}</p>
                                            </div>

                                            <div class="col-sm-6">
                                                <a href="{$relist.link}" style="float: right" class="btn">下载</a>
                                            </div>
                                        </div>
                                    </li>
                                    {/volist}

                                    {volist name="resListOther" id="relist"}
                                    <li>
                                        <div class="row">
                                            <div class="col-sm-6">
                                                <i><input type="checkbox" value="{$relist.id}" name="CopyAddr1"/></i>
                                                <p style="width:300px;height: auto;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;">{$relist.name}</p>
                                            </div>
                                            <div class="col-sm-6">
                                                <a href="{$relist.link}" style="float: right" class="btn">下载</a>
                                            </div>
                                        </div>
                                    </li>
                                    {/volist}
                                </ul>
                            </div>
                        </div>
                    </div>
                    {/if}
                    <!--下载地址2-->
                {/if}
            </div>
        </div>

        <div class="row" >
            <div class="col" >
                <div style="background: white;width: 100%;height: auto;padding: 10px;">
                    <a name="desc"></a>
                    <div class="title"><span>剧情介绍</span></div>
                    <div class="endtext">
                        {$film.plot}
                    </div>
                </div>
            </div>
        </div>
    </div>

    <!--引入底部html文件 -->
    {include file="index/footer" /}
    <!--评分插件-->
    <script type="text/javascript">
        /**在线播放*/
        function Flh(e) {
            var f = $(e).attr("data");
            var j = $(e).attr("j");
            if (f != "") {
                var  url = window.prourl+"/index/xl/detail/film_id/"+window.filmId+"/src/" + Base64.encodeURI(f) + "/j/" + j + "#kan";
                location.href = url;
            }
        }
        /**在线播放*/

        /**失效一键反馈*/
        function fk(e) {
            /*获取是否存在cookie评分值*/
            if (getCookie(e+"{$film.id}") == null) {
                /**
                 * 未评分
                 */
                var title = "";
                var content = "";
                switch (e) {
                    case "y1":
                        title = "在线点播1失效反馈";
                        content = "胖哥温馨提示：你好，有一位本网站忠实粉丝惊奇的发现{$film.cataLogName}-{$film.subClassName}-{$film.typeName}-<span  style='color:#00AFE4;'>[{$film.name}]</span>的在线点播1已失效，请前往<a href='"+window.prourl+"xl/detail.html?film_id={$film.id}'>查看</a>是否失效，若失效请去<a href='"+window.prourl+"film.html?film_id={$film.id}'>更改</a>";
                        break;
                    case "y2":
                        title = "在线点播2失效反馈";
                        content = "胖哥温馨提示：你好，有一位本网站忠实粉丝惊奇的发现{$film.cataLogName}-{$film.subClassName}-{$film.typeName}-<span  style='color:#00AFE4;'>[{$film.name}]</span>的在线点播2已失效，请前往<a href='"+window.prourl+"xl/detail.html?film_id={$film.id}'>查看</a>是否失效，若失效请去<a href='"+window.prourl+"film.html?film_id={$film.id}'>更改</a>";
                        break;
                    case "x1":
                        title = "下载地址1失效反馈";
                        content = "胖哥温馨提示：你好，有一位本网站忠实粉丝惊奇的发现{$film.cataLogName}-{$film.subClassName}-{$film.typeName}-<span  style='color:#00AFE4;'>[{$film.name}]</span>的下载地址1已失效，请前往<a href='"+window.prourl+"xl/detail.html?film_id={$film.id}'>查看</a>是否失效，若失效请去<a href='"+window.prourl+"film.html?film_id={$film.id}'>更改</a>";
                        break;
                    case "x2":
                        title = "下载地址2失效反馈";
                        content = "胖哥温馨提示：你好，有一位本网站忠实粉丝惊奇的发现{$film.cataLogName}-{$film.subClassName}-{$film.typeName}-<span  style='color:#00AFE4;'>[{$film.name}]</span>的下载地址2已失效，请前往<a href='"+window.prourl+"xl/detail.html?film_id={$film.id}'>查看</a>是否失效，若失效请去<a href='"+window.prourl+"film.html?film_id={$film.id}'>更改</a>";
                        break;
                    default:
                        alert("参数错误");
                        break;
                }
                if(title!=""&&content!=""){
                    $.ajax({
                        url: "sendEmail.html",
                        type: "post",
                        dataType: "json",
                        data: "title=" + title + "&content=" + content,
                        success: function (data) {
                            if (JSON.parse(data).code == '1') {
                                alert("反馈成功，我们会尽快处理");
                                setCookie(e+"{$film.id}", e);
                            } else {
                                alert("反馈失败,请稍后重试！");
                            }
                        }
                    });
                }
            } else {
                alert("你已经反馈过了，谢谢你的支持");
            }
        }
        /**失效一键反馈*/
    </script>

    <script type="text/javascript">
        function updateLikeImgSize() {
            var w = $(".img-list").width() / 8;
            if ($(".img-list").width() < 500) {
                w = $(".img-list").width() / 2;
            }
            w = parseInt(w-8);
            $(".img-list li").css("width", w + "px");
            var h = (w * 160) / 115;
            $(".img-list li").css("height", h + "px");
        }

        $(function(){
            updateLikeImgSize();
            $(window).resize(function(){
                updateLikeImgSize();
            });
        });
    </script>
</body>
</html>